package com.yuba.front.domain.bo;

import com.yuba.front.domain.Articles;
import com.yuba.common.mybatis.core.domain.BaseEntity;
import com.yuba.common.core.validate.AddGroup;
import com.yuba.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 钓鱼知识库业务对象 articles
 *
 * @author modakai
 * @date 2024-12-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Articles.class, reverseConvertGenerate = false)
public class ArticlesBo extends BaseEntity {

    /**
     * 文章ID
     */
    @NotNull(message = "文章ID不能为空", groups = { EditGroup.class })
    private Long articleId;

    /**
     * 文章标题
     */
    @NotBlank(message = "文章标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 文章所属分类的类型（4位字符，如BS01表示基础常识）
     */
    @NotBlank(message = "文章所属分类的类型（4位字符，如BS01表示基础常识）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String categoryCode;

    /**
     * 是否同步知识库
     */
    private String vectorSyncFlag;

    /**
     * 文章内容
     */
    @NotBlank(message = "文章内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String content;

    /**
     * 浏览量
     */
    @NotNull(message = "浏览量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long views;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String description;


}
